package com.homedo.odin.solution.model.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * @author ZhangLei
 * @date 2018-05-15
 * @description 解决方案分类记录
 */
@Data
@TableName("user_action_log")
public class UserActionLog extends Model<UserActionLog> {

    private static final long serialVersionUID = 1L;


    /**
     * 唯一标识
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 业务类型，用于区分不同业务数据
     */
    @TableField(value = "business_type")
    private String businessType;
    /**
     * 业务ID
     */
    @TableField(value = "business_id")
    private Long businessId;
    /**
     * 点击的用户 ID
     */
    @TableField(value = "user_id")
    private Integer userId;
    /**
     * 选项名称
     */
    @TableField(value = "text")
    private String text;

    /**
     * 页面位置码
     */
    @TableField(value = "position_code")
    private String positionCode;
    /**
     * 用户IP 地址
     */
    @TableField(value = "ip")
    private String ip;
    /**
     * Referer 地址
     */
    @TableField(value = "referer")
    private String referer;
    /**
     * 创建时间
     */
    @TableField(value = "created_time")
    private Date createdTime;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
